        <?php
            // get data for chart
            $xAxis      = '';
            $series = array();
            foreach($this->exportTitle as $key=>$title){
                if($key != 'total'){
                    $series[$key]   = "{name: '$title',data: [";
                }
            }
            $stt        = 0;
            foreach($this->exportData as $key=>$value){
                if($stt > 0){
                    $xAxis  .= ', ';
                }
                $xAxis  .= "'".$this->time()->dataToDate($key)."'";
                foreach($value as $key2=>$value2){
                    if($key2 != 'total'){
                        $value2 = (int)$value2;
                        if($stt > 0)
                            $series[$key2] .= ', ';
                        $series[$key2] .= $value2;
                    }
                }
                ++$stt;
            }
            foreach($this->exportTitle as $key=>$title){
                if($key != 'total'){
                    $series[$key]   .= ']}';
                }
            }
            $series = implode(",",$series);
        ?>
        <script src="/js/string.js"></script>
        <script src="/highcharts-3.0.1/js/highcharts.js"></script>
        <script src="/highcharts-3.0.1/js/modules/exporting.js"></script>
        <script type="text/javascript">
            $(function () {
                    $('#chart').highcharts({
                        chart: {
                            type: 'line',
                            marginRight: 40,
                            marginBottom: 100
                        },
                        title: {
                            text: '<?php echo $this->title;?>',
                            x: -20 //center
                        },
                        subtitle: {
                            text: '<?php echo $this->subtitle;?>',
                            x: -20
                        },
                        // Title hàng ngang
                        xAxis: {
                            categories: [<?php echo $xAxis; ?>],
                            labels: {
                                    rotation: 45,
                                    x: 16,
                                    y: 35,
                                    style: {'text-decoration': 'underline','color':'#000000','font-size':'12px'}
                                }
                        },
                        // Title hàng dọc
                        yAxis: {
                            title: {
                                text: '<?php echo $this->titleYAxis;?>'
                            },
                            plotLines: [{
                                value: 0,
                                width: 1,
                                color: '#808080'
                            }]
                        },
                        //Hover vào giá trị trên biểu đồ
                        tooltip: {
                            formatter: function() {
                                    return '<b>'+ this.series.name +'</b><br/>'+
                                    this.x +': '+ formatMonney1(this.y, '<?php echo (isset($this->unit) ? $this->unit : '');?>');
                            }
                        },
                        // Chú thích
                        legend: {
                            layout: 'horizontal',//vertical
                            align: 'center',//right
                            verticalAlign: 'top',
                            x: -20,
                            y: 40,
                            borderWidth: 0
                        },
                        //Giá trị trên biểu đồ
                        series: [<?php echo $series;?>]
                    });
                });
    
    
    	</script>
        <div id="chart"></div>
        <div class="page">
            <?php if(isset($this->prevDate)){ ?>
               <a class="prev loading" href="<?php echo $this->url(array ( 'date' => $this->prevDate )); ?>">&laquo; Trước</a>
            <?php }elseif(isset($this->prevDateStart) && isset($this->prevDateEnd)){ ?>
                <a class="prev loading" href="<?php echo $this->url(array('dateStart' => $this->prevDateStart,'dateEnd' => $this->prevDateEnd)); ?>">&laquo; Trước</a>
            <?php } ?>
            <!--<a class="export" href="<?php echo $this->url(array('action' => 'export', 'keyMem' => $this->keyMem)); ?>"><img style="margin: 3px 0 0 0;" src="/image/icons/icon_excel.png" title="Xuất file excel" alt="Xuất file excel"/></a>-->
            <a class="export" href="<?php echo $this->url(array('export' => 'excel')); ?>"><img style="margin: 3px 0 0 0;" src="/image/icons/icon_excel.png" title="Xuất file excel" alt="Xuất file excel"/></a>
            <?php if(isset($this->nextDate)){ ?>
                <a class="next loading" href="<?php echo $this->url(array ( 'date' => $this->nextDate )); ?>">Sau &raquo;</a>
            <?php }elseif(isset($this->nextDateStart) && isset($this->nextDateEnd)){ ?>
                <a class="next loading" href="<?php echo $this->url(array('dateStart' => $this->nextDateStart,'dateEnd' => $this->nextDateEnd)); ?>">Sau &raquo;</a>
            <?php } ?>
        </div>